package com.llbnk.srb.core.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.llbnk.srb.core.pojo.dto.ExcelDictDTO;
import com.llbnk.srb.core.pojo.entity.Dict;

import java.io.InputStream;
import java.util.List;

/**
 * <p>
 * 数据字典 服务类
 * </p>
 *
 * @author llbnk
 * @since 2022-04-07
 */
public interface DictService extends IService<Dict> {
    /*
    我们要从流InputStream读excel
    能够调用service的就是controller
    excel通过浏览器端前端传递到controller
     */
    void importData(InputStream inputStream);

    List<ExcelDictDTO> listDictData();

    List<Dict> listByParentId(Long parentId);

    List<Dict> findByDictCode(String dictCode);

    String getNameByParentDictCodeAndValue(String dictCode,Integer value);
}
